Skip to content

Include pulsar-client-admin-api in the shaded version of pulsar-client-admin - #9689

Merged
jerrypeng merged 1 commit into
apache:masterfrom
jerrypeng:fix_pulsar_client_admin_pom
Feb 24, 2021
Merged

Include pulsar-client-admin-api in the shaded version of pulsar-client-admin#9689
jerrypeng merged 1 commit into
apache:masterfrom
jerrypeng:fix_pulsar_client_admin_pom

Conversation

@jerrypeng

Copy link
Copy Markdown
Contributor

In the following PR:

#9246

The API of the pulsar-client-admin was separated into another module. However, the api module was not added to be included in the shaded version of pulsar-client-admin. This creates dependency issues such as

java.lang.NoSuchMethodError: org.apache.pulsar.client.admin.PulsarAdminException.<init>(Lorg/apache/pulsar/shade/javax/ws/rs/ClientErrorException;)V

@jerrypeng jerrypeng added the type/bug The PR fixed a bug or issue reported a bug label Feb 23, 2021
@jerrypeng jerrypeng added this to the 2.8.0 milestone Feb 23, 2021
@jerrypeng
jerrypeng requested review from merlimat and sijie February 23, 2021 21:19
@jerrypeng jerrypeng self-assigned this Feb 23, 2021
<include>org.apache.pulsar:pulsar-client-original</include>
<include>org.apache.pulsar:pulsar-client-api</include>
<include>org.apache.pulsar:pulsar-client-admin-original</include>
<include>org.apache.pulsar:pulsar-client-admin-api</include>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, the API module should be left out of the shaded jar, instead being a transitive dependency

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@merlimat pulsar-client-api is included as well. The problem is with shading. If pulsar-client-admin-api is not included in the shaded JAR and is just pull in as a transitive dependency errors like

java.lang.NoSuchMethodError: org.apache.pulsar.client.admin.PulsarAdminException.<init>(Lorg/apache/pulsar/shade/javax/ws/rs/ClientErrorException;)V

will occur because the impl will be using the shaded version classes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @jerrypeng
we already have org.apache.pulsar:pulsar-client-apiis it an error ?

@sijie

sijie commented Feb 24, 2021

Copy link
Copy Markdown
Member

@freeznet Can you review this? I think this is related to one task you are working on.

<include>org.apache.pulsar:pulsar-client-original</include>
<include>org.apache.pulsar:pulsar-client-api</include>
<include>org.apache.pulsar:pulsar-client-admin-original</include>
<include>org.apache.pulsar:pulsar-client-admin-api</include>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @jerrypeng
we already have org.apache.pulsar:pulsar-client-apiis it an error ?

@jerrypeng
jerrypeng merged commit e65deaf into apache:master Feb 24, 2021
merlimat pushed a commit to merlimat/pulsar that referenced this pull request Apr 6, 2021
…t-admin (apache#9689)

Co-authored-by: Jerry Peng <jerryp@splunk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants